/*
 * unittest1.c
 * CS362 Assignment 2
 * Hugh McDonald (mcdonalh)
 */
#include "dominion.h"
#include <assert.h>
#include <stdio.h>

int main(int argc, char **argv)
{
	printf("unittest1:\n");

	// Start a new game
	struct gameState *testGame = newGame();

	// Initialize the game
	int testNumOfPlayers = 2;
	int testRandomSeed = -1;
	int k[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, village, baron, great_hall};
	int r = initializeGame(testNumOfPlayers, k, testRandomSeed, testGame);

	// Check Init Success
	assert (r == 0);

	// Number of Players
	assert(testNumOfPlayers == testGame->numPlayers);

	// Check Supply Counts
	assert(testGame->supplyCount[curse] == 10);
	assert(testGame->supplyCount[estate] == 8);
    assert(testGame->supplyCount[duchy] == 8);
    assert(testGame->supplyCount[province] == 8);

    // Check Treasure Cards
    assert(testGame->supplyCount[copper] == 60 - (7 * testNumOfPlayers));
  	assert(testGame->supplyCount[silver] == 40);
  	assert(testGame->supplyCount[gold] == 30);

	return 0;
}